Skip to content

feat: reset pathfinding scores before probes#181

Merged
piotr-iohk merged 4 commits into
mainfrom
feat/probe-reset-scores
Jun 12, 2026
Merged

feat: reset pathfinding scores before probes#181
piotr-iohk merged 4 commits into
mainfrom
feat/probe-reset-scores

Conversation

@piotr-iohk

Copy link
Copy Markdown
Collaborator

This PR adds PROBE_RESET_SCORES support to the mainnet probe spec, so each run can start from a fresh pathfinding scorer.

Description

  • When PROBE_RESET_SCORES=true (default false), the probe spec calls the new resetScores devtools method after wallet restore and before readiness: the app stops the node, deletes the scorer and external_pathfinding_scores_cache VSS keys, and restarts the node
  • Readiness is then additionally gated on the scores sync: the node's latestPathfindingScoresSyncTimestamp must be at most PROBE_SCORES_SYNC_MAX_AGE_S (default 900s) old and newer than the reset start time, guarding against a failed external scores fetch silently producing a "no scores" run (the sync timestamp persisted in node metrics survives the restart)
  • Adds scoresSync to the readiness summary and Scores reset to the probe report
  • Documents PROBE_RESET_SCORES, PROBE_RESET_SCORES_TIMEOUT_SECONDS, PROBE_SCORES_SYNC_MAX_AGE_S, and PROBE_RESET_SCORES_METHOD in docs/mainnet-probe.md

Without the reset, locally learned scores accumulate in VSS under the probe seed across runs (probe results train the scorer), so consecutive scorer A/B runs are not comparable.

Pairs with:

QA Notes

Manual Tests

  • 1. Local run with PROBE_RESET_SCORES=true against a mainnet e2e APK: reset completes (~7s), readiness satisfied with fresh scoresSync timestamp, probes run.
  • 2. regression: run without PROBE_RESET_SCORES: behavior unchanged (no reset, no scores sync gating).

Automated Checks

  • Typecheck passes for the changed files (remaining errors are pre-existing unused imports in unrelated specs).
  • Device logs verified the full reset sequence: VSS deletes confirmed by server, node rebuilt without cache merge, fresh external scores downloaded post-reset.

Made with Cursor

@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread test/helpers/probe.ts Outdated
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

@cursor review

@piotr-iohk piotr-iohk self-assigned this Jun 11, 2026
Comment thread test/helpers/probe.ts Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread test/helpers/probe.ts
Co-authored-by: Cursor <cursoragent@cursor.com>
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a13a025. Configure here.

@piotr-iohk piotr-iohk requested a review from pwltr June 11, 2026 15:02
@piotr-iohk piotr-iohk merged commit 80898fd into main Jun 12, 2026
1 check passed
@piotr-iohk piotr-iohk deleted the feat/probe-reset-scores branch June 12, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants